Maarten van der Velde Last updated: 2025-03-14
library(here)
library(data.table)
library(ggplot2)
library(jsonlite)
library(purrr)
library(tidytext)
library(dplyr)
library(wordcloud2)
theme_memorylab_url <- "https://raw.githubusercontent.com/SlimStampen/theme_memorylab/master/theme_memorylab.R"
source(theme_memorylab_url)Students answered a number of evaluation questions after the posttest.
## Antwoord Noorderpoort Alfa-college
## <char> <int> <int>
## 1: Wat ik moeilijk/uitdagend vond 9 2
## 2: Wat niet te moeilijk en niet te makkelijk vond 23 2
## 3: Wat ik makkelijk vond 19 2
## 4: Random 28 2
## 5: Wat de docent vertelde 2 0
## 6: Anders, namelijk ... 3 2
## Totaal freq
## <int> <num>
## 1: 11 0.11702128
## 2: 25 0.26595745
## 3: 21 0.22340426
## 4: 30 0.31914894
## 5: 2 0.02127660
## 6: 5 0.05319149
ggplot(q1, aes(x = reorder(Antwoord, freq), y = freq)) +
geom_col(fill = colours_memorylab[1]) +
scale_y_continuous(labels = scales::percent_format()) +
labs(title = "Hoe koos je welke les je ging doen?",
x = NULL,
y = NULL) +
coord_flip() +
theme_ml() +
theme(panel.grid.major.x = element_line(colour = "grey90"))What proportion of students made a choice based on difficulty?
## [1] 0.606383
q2 <- fread(here("data", "feedback", "q2_topic.csv"), header = TRUE)
q2_long <- melt(q2, measure.vars = 2:12, variable.name = "positie", value.name = "N")
q2_long[, positie := as.numeric(positie)]
# Calculate the average position by topic
q2_rank <- q2_long[, .(mean_rank = weighted.mean(positie, N)), by = "topic"]
ggplot(q2_rank, aes(x = reorder(topic, -mean_rank), y = mean_rank)) +
geom_col(fill = colours_memorylab[1]) +
labs(title = "Bij welk onderwerp vond je MemoryLab het meest toevoegen?",
x = NULL,
y = "Gemiddelde rang (lager is beter)") +
coord_flip() +
theme_ml() +
theme(panel.grid.major.x = element_line(colour = "grey90"))q3 <- fread(here("data", "feedback", "q3_grade.csv"))
q3[, freq := Totaal / sum(Totaal)]
# Mean grade
q3[, weighted.mean(grade, Totaal)]## [1] 6.561224
## [1] 0.8265306
ggplot(q3, aes(x = grade, y = freq)) +
geom_col(fill = colours_memorylab[1]) +
scale_x_continuous(breaks = 1:10) +
scale_y_continuous(labels = scales::percent_format()) +
labs(title = "Geef MemoryLab een cijfer",
x = "Cijfer",
y = NULL) +
theme_ml()## Antwoord Noorderpoort Alfa-college Totaal freq
## <char> <int> <int> <int> <num>
## 1: Ja 63 3 66 0.7173913
## 2: Nee 19 7 26 0.2826087
stop_words <- get_stopwords(language = "nl")
# Read text file
q1 <- readLines(here("data", "feedback", "Q_watvondjefijn.txt"))
q1_words <- tibble(answer = tolower(q1)) |>
unnest_tokens(word, answer) |>
anti_join(stop_words, by = "word") |>
count(word, sort = TRUE)
# Make wordcloud
wordcloud2(q1_words,
shuffle = FALSE,
minSize = 4,
size = 4,
rotateRatio = .4
)q2 <- readLines(here("data", "feedback", "Q_watvondjenietfijn.txt"))
q2_words <- tibble(answer = tolower(q2)) |>
unnest_tokens(word, answer) |>
anti_join(stop_words, by = "word") |>
count(word, sort = TRUE)
# Make wordcloud
wordcloud2(q2_words,
shuffle = FALSE,
minSize = 4,
size = 4,
rotateRatio = .4
)